<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 高内聚，低耦合
      // this 表示指向当前对象
      var person1 = {
        name: "张三",
        showInfo: function () {
          console.log(this === person1);
          console.log(this.name);
        }
      };

      person1.showInfo();
    </script>
  </body>
</html>
